.class public Lcom/estrongs/android/scanner/service/c;
.super Ljava/lang/Object;
.source "FileMonitorTask.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/scanner/service/c$d;
    }
.end annotation


# instance fields
.field private final a:Landroid/os/Handler;

.field private final b:Ljava/util/concurrent/atomic/AtomicInteger;

.field private c:Lcom/estrongs/android/scanner/service/b;

.field private d:Ljava/util/concurrent/CopyOnWriteArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/concurrent/CopyOnWriteArrayList<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private final e:Ljava/lang/Runnable;

.field private final f:Lcom/estrongs/android/scanner/service/d;


# direct methods
.method public constructor <init>()V
    .locals 2

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Lcom/estrongs/android/scanner/service/c$d;

    invoke-direct {v0}, Lcom/estrongs/android/scanner/service/c$d;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/scanner/service/c;->a:Landroid/os/Handler;

    .line 3
    new-instance v0, Ljava/util/concurrent/atomic/AtomicInteger;

    const/4 v1, 0x0

    invoke-direct {v0, v1}, Ljava/util/concurrent/atomic/AtomicInteger;-><init>(I)V

    iput-object v0, p0, Lcom/estrongs/android/scanner/service/c;->b:Ljava/util/concurrent/atomic/AtomicInteger;

    .line 4
    new-instance v0, Lcom/estrongs/android/scanner/service/c$b;

    invoke-direct {v0, p0}, Lcom/estrongs/android/scanner/service/c$b;-><init>(Lcom/estrongs/android/scanner/service/c;)V

    iput-object v0, p0, Lcom/estrongs/android/scanner/service/c;->e:Ljava/lang/Runnable;

    .line 5
    new-instance v0, Lcom/estrongs/android/scanner/service/c$c;

    invoke-direct {v0, p0}, Lcom/estrongs/android/scanner/service/c$c;-><init>(Lcom/estrongs/android/scanner/service/c;)V

    iput-object v0, p0, Lcom/estrongs/android/scanner/service/c;->f:Lcom/estrongs/android/scanner/service/d;

    .line 6
    new-instance v0, Ljava/util/concurrent/CopyOnWriteArrayList;

    invoke-static {}, Les/vu;->a()Ljava/util/List;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/util/concurrent/CopyOnWriteArrayList;-><init>(Ljava/util/Collection;)V

    iput-object v0, p0, Lcom/estrongs/android/scanner/service/c;->d:Ljava/util/concurrent/CopyOnWriteArrayList;

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/scanner/service/c;)Lcom/estrongs/android/scanner/service/b;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/scanner/service/c;->c:Lcom/estrongs/android/scanner/service/b;

    return-object p0
.end method

.method static synthetic b(Lcom/estrongs/android/scanner/service/c;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Lcom/estrongs/android/scanner/service/c;->c()V

    return-void
.end method

.method static synthetic c(Lcom/estrongs/android/scanner/service/c;)Ljava/util/concurrent/atomic/AtomicInteger;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/scanner/service/c;->b:Ljava/util/concurrent/atomic/AtomicInteger;

    return-object p0
.end method

.method private c()V
    .locals 4

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/scanner/service/c;->d:Ljava/util/concurrent/CopyOnWriteArrayList;

    if-nez v0, :cond_0

    return-void

    .line 3
    :cond_0
    invoke-virtual {v0}, Ljava/util/concurrent/CopyOnWriteArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_3

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    .line 4
    new-instance v2, Ljava/io/File;

    invoke-direct {v2, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 5
    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v2

    if-eqz v2, :cond_2

    .line 6
    new-instance v2, Ljava/io/File;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v1, ".escheck.tmp"

    invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v2, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 7
    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v1

    if-eqz v1, :cond_1

    .line 8
    invoke-virtual {v2}, Ljava/io/File;->delete()Z

    goto :goto_0

    .line 9
    :cond_1
    :try_start_0
    invoke-virtual {v2}, Ljava/io/File;->createNewFile()Z
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    nop

    goto :goto_0

    .line 10
    :cond_2
    iget-object v2, p0, Lcom/estrongs/android/scanner/service/c;->d:Ljava/util/concurrent/CopyOnWriteArrayList;

    invoke-virtual {v2, v1}, Ljava/util/concurrent/CopyOnWriteArrayList;->remove(Ljava/lang/Object;)Z

    goto :goto_0

    :cond_3
    return-void
.end method

.method static synthetic d(Lcom/estrongs/android/scanner/service/c;)Landroid/os/Handler;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/scanner/service/c;->a:Landroid/os/Handler;

    return-object p0
.end method

.method static synthetic e(Lcom/estrongs/android/scanner/service/c;)Ljava/util/concurrent/CopyOnWriteArrayList;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/scanner/service/c;->d:Ljava/util/concurrent/CopyOnWriteArrayList;

    return-object p0
.end method

.method static synthetic f(Lcom/estrongs/android/scanner/service/c;)Ljava/lang/Runnable;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/scanner/service/c;->e:Ljava/lang/Runnable;

    return-object p0
.end method


# virtual methods
.method public a()V
    .locals 1

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/scanner/service/c;->c:Lcom/estrongs/android/scanner/service/b;

    if-eqz v0, :cond_0

    .line 3
    invoke-virtual {v0}, Lcom/estrongs/android/scanner/service/b;->a()V

    :cond_0
    return-void
.end method

.method public b()V
    .locals 2

    .line 2
    new-instance v0, Lcom/estrongs/android/scanner/service/b;

    iget-object v1, p0, Lcom/estrongs/android/scanner/service/c;->f:Lcom/estrongs/android/scanner/service/d;

    invoke-direct {v0, v1}, Lcom/estrongs/android/scanner/service/b;-><init>(Lcom/estrongs/android/scanner/service/d;)V

    iput-object v0, p0, Lcom/estrongs/android/scanner/service/c;->c:Lcom/estrongs/android/scanner/service/b;

    .line 3
    new-instance v0, Ljava/lang/Thread;

    new-instance v1, Lcom/estrongs/android/scanner/service/c$a;

    invoke-direct {v1, p0}, Lcom/estrongs/android/scanner/service/c$a;-><init>(Lcom/estrongs/android/scanner/service/c;)V

    invoke-direct {v0, v1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    const/16 v1, 0xa

    .line 4
    invoke-virtual {v0, v1}, Ljava/lang/Thread;->setPriority(I)V

    .line 5
    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    return-void
.end method
